from enum import Enum


class VersionEnum(Enum):
    V8 = ("V8", "_SYSTEM_MENU_LEVEL_V8")
    V81E = ("V81E", "_SYSTEM_MENU_LEVEL_V8")
    V9 = ("V9", "_SYSTEM_MENU_LEVEL_V9")
    V9T = ("V9T", "_SYSTEM_MENU_LEVEL_V9T")
    V90E = ("V90E", "_SYSTEM_MENU_LEVEL_V90E")
    V9B = ("V9B", "_SYSTEM_MENU_LEVEL_V9B")
    BIG_DATA = ("BIGDATA", "_BIG_MENU")
    TEST = ("TEST", "")
    ZCM_TEST = ("ZCM_TEST", "")
    ZCM = ("ZCM", "")
    FISHX = ("FISHX", "")

    def __init__(self, version, system_menu_level):
        self.version = version
        self.system_menu_level = system_menu_level

    @classmethod
    def get_by_version(cls, version):
        for versionEnum in cls:
            if versionEnum.version == version:
                return versionEnum
        return VersionEnum.V9
